<!-- 教学管理-校园管理-校园资料 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>
          <el-col :span="6">
            <el-form-item label="基地名称">
              <el-input v-model="listQuery.fcatname" placeholder="请输入编号或名称" clearable />
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="所属地区">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
              <!-- <el-button type="success" icon="el-icon-plus" @click="insert(undefined)">新增</el-button> -->
              <!-- <el-button type="warning" icon="el-icon-upload2">导入</el-button> -->
              <el-button type="success" icon="el-icon-download">导出</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FCATNO" label="基地编号" ></el-table-column>
          <el-table-column prop="FCATNAME" label="基地名称"></el-table-column>
          <el-table-column prop="FAREA" label="所属地区" ></el-table-column>           
          <el-table-column prop="FMAN" label="联系人" width="105"></el-table-column>
          <el-table-column prop="FTEL" label="联系电话" width="135"></el-table-column>
          <el-table-column prop="FMEMO" label="基地介绍"></el-table-column>
          <!-- <el-table-column prop="FADDRESS" label="基地地址"></el-table-column> -->
          <el-table-column prop="FVISIBLE" label="状态"  width="95">
            <template slot-scope="scope">
              {{ scope.row.FVISIBLE | dynamicText(fvisiblelist) }}
            </template>
          </el-table-column>
          <el-table-column fixed="left" label="操作" width="105">
            <template slot-scope="scope">
              <el-button @click.native.prevent="insert(scope.row.FCATNO)" icon="el-icon-edit" type="text" size="small">
                查看
              </el-button>
              <!-- <el-popconfirm title="确定删除当前数据吗？" @confirm="Catdelete(scope.row.FCATNO)">
                <el-button slot="reference" icon="el-icon-delete" style="color: red;margin-left: 10px;"
                  type="text">删除</el-button>
              </el-popconfirm> -->
            </template>
          </el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" />
        <Form ref="Form" :parelist="list" />
      </div>
    </div>
  </div>
</template>

<script>
  import Form from "./Form.vue"
  export default {
    name: 'shop',
    components: { Form },
    data() {
      return {
        fvisiblelist: [
          { id: "1", fullName: "正常" },
          { id: "2", fullName: "停止" },
        ],
        total: 0,
        list: [
        {
          "FCATNO": "SH1001",
          "FCATNAME": "上海国际汽车城",
          "FAREA":"嘉定区",
          "FMEMO":"",
          "FMAN":"王老师",
          "FTEL":"021-31601102",
          "FADDRESS": "上海市嘉定区汽车城211号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH1002",
          "FCATNAME": "上海交大生物转基因科创教育基地",
          "FAREA":"徐汇区",
          "FMEMO":"",
          "FMAN":"张老师",
          "FTEL":"021-53321102",
          "FADDRESS": "上海市闵行区东川890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH2001",
          "FCATNAME": "中共一大会址纪念馆",
          "FAREA":"黄埔区",
          "FMEMO":"",
          "FMAN":"张老师",
          "FTEL":"021-65571102",
          "FADDRESS": "上海市黄埔区青岛路890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH2002",
          "FCATNAME": "上海市龙华烈士陵园",
          "FAREA":"徐汇区",
          "FMEMO":"",
          "FMAN":"刘老师",
          "FTEL":"021-62291102",
          "FADDRESS": "上海市徐汇区龙华路890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH3001",
          "FCATNAME": "上海博物馆",
          "FAREA":"黄浦区",
          "FMEMO":"",
          "FMAN":"刘老师",
          "FTEL":"021-62291102",
          "FADDRESS": "上海市黄埔区人民广场890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH4001",
          "FCATNAME": "长岛庄园户外拓展基地",
          "FAREA":"崇明岛区",
          "FMEMO":"",
          "FMAN":"刘老师",
          "FTEL":"021-62291102",
          "FADDRESS": "上海市崇明岛人民广场890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        },{
          "FCATNO": "SH4002",
          "FCATNAME": "绿生沅农庄·户外拓展基地",
          "FAREA":"青浦区",
          "FMEMO":"",
          "FMAN":"赵老师",
          "FTEL":"021-50061102",
          "FADDRESS": "上海市奉贤区人民广场890号",
          "FSEQNO": 28,
          "FVISIBLE": 1,
          "FIMAGE": null,
          "FOPERATOR": "system",
          "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
        }
        ],
        loading: false,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fcatno: "",
          fcatname: ""
        },

        options1: [{
          value: '10',
          label: '黄埔区'
        }, {
          value: '20',
          label: '徐汇区'
        }, {
          value: '30',
          label: '嘉定区'
        }, {
          value: '40',
          label: '青浦区'
        }],

      };
    },
    computed: {},
    created() {
    },
    methods: {
      insert(row) {
        this.$refs.Form.init(row);
      },
    },
  };
</script>